package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FamilyMapper;
import com.ruoyi.system.domain.Family;
import com.ruoyi.system.service.IFamilyService;
import com.ruoyi.common.core.text.Convert;

/**
 * 家族成员Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-05-10
 */
@Service
public class FamilyServiceImpl implements IFamilyService 
{
    @Autowired
    private FamilyMapper familyMapper;

    /**
     * 查询家族成员
     * 
     * @param id 家族成员ID
     * @return 家族成员
     */
    @Override
    public Family selectFamilyById(Long id)
    {
        return familyMapper.selectFamilyById(id);
    }

    /**
     * 查询家族成员列表
     * 
     * @param family 家族成员
     * @return 家族成员
     */
    @Override
    public List<Family> selectFamilyList(Family family)
    {
        return familyMapper.selectFamilyList(family);
    }

    /**
     * 新增家族成员
     * 
     * @param family 家族成员
     * @return 结果
     */
    @Override
    public int insertFamily(Family family)
    {
        return familyMapper.insertFamily(family);
    }

    /**
     * 修改家族成员
     * 
     * @param family 家族成员
     * @return 结果
     */
    @Override
    public int updateFamily(Family family)
    {
        return familyMapper.updateFamily(family);
    }

    /**
     * 删除家族成员对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFamilyByIds(String ids)
    {
        return familyMapper.deleteFamilyByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除家族成员信息
     * 
     * @param id 家族成员ID
     * @return 结果
     */
    @Override
    public int deleteFamilyById(Long id)
    {
        return familyMapper.deleteFamilyById(id);
    }
}
